package ltd.dujiabao.springcloud.service;

import io.swagger.annotations.ApiParam;
import ltd.dujiabao.springcloud.entities.CommonResult;
import ltd.dujiabao.springcloud.entities.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author : DuJiabao
 * @Project : springcloud
 * @Time : 2021/5/22 17:23
 * @Desc :
 */
@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
public interface FeignPaymentService {
  @GetMapping("/payment/get/{id}")
  CommonResult<Payment> selectById(@PathVariable("id") Long id);

  @PostMapping("/payment/create")
  CommonResult<Object> create(@RequestBody Payment payment);

  @GetMapping("/timeOut/{t}")
  CommonResult<Object> timeOut(@PathVariable("t") int t);
}
